﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Baosight.ZNH.ZMCommon;
using Baosight.Platform.Core.UI.Controls;

namespace Baosight.ZNH.ZMCB.UI
{
    public partial class ZMCB06 : EFViewCmes
    {
        public ZMCB06()
        {
            InitializeComponent();
        }

        /// <summary>
        /// 页面初始化操作
        /// </summary>
        /// <param name="initData"></param>
        public override void Initialize(Baosight.Platform.Core.EIInfo initData)
        {
            base.Initialize(initData);

        }

        /// <summary>
        /// 页签改变加载不同的页面
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void EFTab_SelectionChanged(object sender, RoutedEventArgs e)
        {
            EFTab tab = sender as EFTab;
            if (tab.SelectedItem != null)
            {
                EFTabItem item = tab.SelectedItem as EFTabItem;
                item.Content = null;
                Dictionary<string, string> _args = new Dictionary<string, string>();
                _args.Add("fdParentId", this.fdParentId.Value.ToString());
                _args.Add("fdParentType", this.fdParentType.Value.ToString());
                if (tab.SelectedItem.Equals(this.workingFace))
                {
                    this.workingFace.LoadView<EFTabItem>("ZMCB04", _args);//加载采面页面
                }
                else if (tab.SelectedItem.Equals(this.roadWay))
                {
                    this.roadWay.LoadView<EFTabItem>("ZMCB05", _args);//加载巷道页面
                }
            }
        }
    }
}
